﻿Imports System.Data.SqlClient

Public Class FrmGrabadoDeTag

    Dim variableconexion As New SqlConnection(My.Settings.CITRA_ERPConnectionString)
    Dim producto As String


    Private Sub FrmGrabadoDeTag_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        llenarProductos()
        slideOpciones.BackColor = Color.Black
        slideAcciones.IsOpen = False
        slideNuevo.IsOpen = False
        slideOpciones.IsOpen = False
        slideReportes.IsOpen = False
    End Sub

    Private Sub btnNuevo_Click(sender As Object, e As EventArgs) Handles btnNuevo.Click

        slideNuevo.IsOpen = True

    End Sub

    Private Sub btnCerrar_Click(sender As Object, e As EventArgs) Handles btnCerrar.Click
        slideNuevo.IsOpen = False
    End Sub

    Private Sub ButtonItem12_Click(sender As Object, e As EventArgs) Handles ButtonItem12.Click
        slideAcciones.IsOpen = True
    End Sub

    Private Sub ButtonItem23_Click(sender As Object, e As EventArgs) Handles ButtonItem23.Click
        slideAcciones.IsOpen = False
    End Sub

    Private Sub ButtonItem17_Click(sender As Object, e As EventArgs) Handles ButtonItem17.Click
        slideReportes.IsOpen = True
    End Sub

    Private Sub ButtonItem24_Click(sender As Object, e As EventArgs) Handles ButtonItem24.Click
        slideReportes.IsOpen = False
    End Sub

    Private Sub btnMostrarOpciones_Click(sender As Object, e As EventArgs) Handles btnMostrarOpciones.Click
        slideOpciones.IsOpen = True
    End Sub

    Private Sub ButtonItem1_Click(sender As Object, e As EventArgs) Handles ButtonItem1.Click
        slideOpciones.IsOpen = False
    End Sub

    Private Sub ButtonX1_Click(sender As Object, e As EventArgs) Handles ButtonX1.Click
        Me.Close()
    End Sub

    Private Sub ButtonX2_Click(sender As Object, e As EventArgs) Handles ButtonX2.Click

        ProgressBarX1.Value = 10
        System.Threading.Thread.Sleep(300)
        ProgressBarX1.Value = 20
        System.Threading.Thread.Sleep(300)
        ProgressBarX1.Value = 30
        System.Threading.Thread.Sleep(300)
        ProgressBarX1.Value = 40
        System.Threading.Thread.Sleep(300)
        ProgressBarX1.Value = 50
        System.Threading.Thread.Sleep(300)
        ProgressBarX1.Value = 60
        System.Threading.Thread.Sleep(300)
        ProgressBarX1.Value = 70
        System.Threading.Thread.Sleep(300)
        ProgressBarX1.Value = 80
        System.Threading.Thread.Sleep(300)
        ProgressBarX1.Value = 90
        System.Threading.Thread.Sleep(300)
        ProgressBarX1.Value = 100

        MsgBox("El tag ha sido grabado con el codigo " + cmbProducto.SelectedValue.ToString)

        Dim row1() As String = {cmbProducto.SelectedValue.ToString, cmbProducto.Text.ToString}

        dgwTablaGrabadoTag.Rows.Add(row1)


    End Sub


    Private Sub ItemPanel10_ItemClick(sender As Object, e As EventArgs) Handles ItemPanel10.ItemClick

    End Sub
    Private Sub slideOpciones_Load(sender As Object, e As EventArgs) Handles slideOpciones.Load

    End Sub
    Private Sub panelAccesoRapido_ItemClick(sender As Object, e As EventArgs) Handles panelAccesoRapido.ItemClick

    End Sub

    Public Sub llenarProductos()

        Dim ds As New DataSet
        Dim da As New SqlDataAdapter("select Codigo, Nombre from Productos_Nombres where TIPO_IDENTIFICACION='Almacen'", variableconexion)
        da.Fill(ds)

        cmbProducto.DataSource = ds.Tables(0)
        cmbProducto.DisplayMember = "Nombre"
        cmbProducto.ValueMember = "Codigo"


    End Sub



End Class